package com.xiaoshuidi.cloud.module.finance.api.order.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 支付单创建 Request DTO
 */
@Data
@Accessors(chain = true)
public class PayOrderCreateReqDTO implements Serializable {

    /**
     * 支付订单来源id(账单/预约单等)
     */
    @NotEmpty(message = "支付订单来源id不能为空")
    @Schema(description = "支付订单来源id")
    private String sourceBizId;
    /**
     * 支付订单来源类型(账单/预约单等)
     * {@link com.xiaoshuidi.cloud.module.finance.enums.finance.SourceBizTypeEnum}
     */
    @NotEmpty(message = "支付订单来源类型不能为空")
    @Schema(description = "RENT_ORDER(\"账单\"), ROOM_RESERVE(\"房源预定\"), ACCOUNT_RECHARGE(\"账户充值\"), OWNER_ORDER(\"业主合同\"), COMPANY_RENT_ORDER(\"企业账单\"), SETTLEMENT_BILL(\"清算单\")")
    private String sourceBizType;
    /**
     * 线下交易单号/线上支付第三方交易号
     **/
    @Schema(description = "线下交易单号/线上支付第三方交易号")
    private String tradeNo;
    /**
     * 线下交易账号(转账等)
     **/
    @Schema(description = "线下交易账号")
    private String tradeAccount;
    /**
     * 付款方式
     */
    @Schema(description = "付款方式")
    private String payMethod;
    /**
     * 交易对象姓名
     **/
    @Schema(description = "交易对象姓名")
    private String trader;
    /**
     * 经办人姓名
     **/
    @Schema(description = "经办人姓名")
    private String operator;
    /**
     * 交易日期
     **/
    @Schema(description = "交易日期(时间戳)")
    private LocalDateTime tradeTime;
    /**
     * 交易操作完成日期
     **/
    @Schema(description = "交易操作完成日期(时间戳)")
    private LocalDateTime payTime;
    /**
     * 附件
     */
    @Schema(description = "附件")
    private String attachment;
    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 收款金额
     */
    @Schema(description = "收款金额")
    private BigDecimal price;

}
